<include file="public@header"/>
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
</style>

</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="#">设置logo</a></li>
    </ul>
    <form action="{:url('TechAdmin/addlogo')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
        <input type="text" name="id" value="{$res.id}" style="display: none">
        <div class="row">
            <div class="col-md-9">
                <table class="table table-bordered">

                    <tr>
                        <th style="text-align: center">logo图像(375*175)</th>
                        <td>
                            <div>
                                <input type="hidden" name="logo[thumbnail]" class="form-control"
                                       id="js-thumbnail-input"　required value="{$image}">
                                <div>
                                    <a href="javascript:uploadOneImage('图片上传','#js-thumbnail-input');">
                                        <img src="{$res.log}"
                                             id="js-thumbnail-input-preview"
                                             width="135" style="cursor: pointer"/>
                                    </a>
                                    <input type="button" class="btn btn-sm btn-cancel-thumbnail"
                                           onclick="$('#thumbnail-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumbnail').val('');return false;"
                                           value="取消图片">
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary js-ajax-submit">提交</button>
                    </div>
                </div>
            </div>

        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script>
    $(function(){
        $('.btn-cancel-thumbnail').click(function () {
            $('#js-thumbnail-input-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#js-thumbnail-input').val('');
        });
    });
</script>
</body>
</html>